//index.js
//获取应用实例
var app = getApp()
Page({
	data: {
		navs: [
			{
				"url": "/we7_hotel_demo/pages/index/index",
				"name": "微酒店",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": true
			},
			{
				"url": "/we7/pages/newsDetail/newsDetail",
				"name": "html2wxml",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": true
			},
			{
				"url": "/we7_demo/pages/index/index",
				"name": "demo",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_demo/pages/index/index",
				"name": "demo",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_hotel_demo/pages/user/user",
				"name": "微酒店我的",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},{
				"url": "/we7_demo/pages/index/index",
				"name": "demo",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_demo/pages/index/index",
				"name": "demo",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_hotel_demo/pages/user/user",
				"name": "微酒店我的",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_demo/pages/index/index",
				"name": "demo",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_hotel_demo/pages/user/user",
				"name": "微酒店我的",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},{
				"url": "/we7_demo/pages/index/index",
				"name": "demo",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_demo/pages/index/index",
				"name": "demo",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			},
			{
				"url": "/we7_hotel_demo/pages/user/user",
				"name": "微酒店我的",
				"icon": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg",
				"isTab": false
			}
		],
		slide: [
			{
				"url": "we7/pages/user/user",
				"title": "xxxx",
				"thumb": "http:\/\/pro.we7.cc\/attachment\/images\/5921\/2016\/10\/I966f8ffg4p1ylfY8cWtzW4Ty99YX8.jpg"
			}
		],
		commend: [],
		userInfo: {}
	},
	onLoad: function () {
		var that = this
		app.util.footer(that);
		//调用应用实例的方法获取全局数据
		app.getUserInfo(function (userInfo) {
			//更新数据
			that.setData({
				userInfo: userInfo
			});
		});
		//初始化导航数据
		// app.util.request(that, {
		// 	'url': 'wxapp/home/nav',
		// 	'datakey': 'navs',
		// 	'cachetime': '30'
		// });
		// app.util.request(that, {
		// 	'url': 'wxapp/home/slide',
		// 	'datakey': 'slide',
		// 	'dataway': 1,
		// 	'cachetime': '30'
		// });
		// app.util.request(that, {
		// 	'url': 'wxapp/home/commend',
		// 	'datakey': 'commend',
		// 	'cachetime': '30'
		// });
	}
});
